package com.gujia.designpattern.strategy;

import com.gujia.designpattern.strategy.impl.FlyByRocket;

public class SpaceDuck extends Duck{

    public SpaceDuck() {
        this.setFlyingStragety(new FlyByRocket());
    }

    @Override
    public void display() {
        System.out.println("我头戴宇航头盔");
    }

    @Override
    public void quack() {
        System.out.println("我通过无线电与你通信");
    }
}
